/*
 * @Author: TC
 * @Date: 2025-06-20 15:43:08
 * @Last Modified by: TC
 * @Last Modified time: 2025-06-20 15:43:58
 */
import { _decorator, Component, Node } from "cc";
import { cBody } from "db://assets/FrameWork/Module/Collision/Body";
import { ColliderObject, Trigger } from "db://assets/FrameWork/Module/Collision/ColliderObject";
const { ccclass, property } = _decorator;

/**
 * 战斗中的碰撞体
 */
@ccclass("BattleCollider")
export abstract class BattleCollider extends ColliderObject {
    onTrigger(b: cBody, trigger: Trigger) {
        switch (trigger) {
            case Trigger.enter:
                this.onTriggerEnter(b);
                break;
            case Trigger.stay:
                // this.onTriggerStay(b, frameID);
                break;
            case Trigger.exit:
                // this.onTriggerExit(b);
                break;
        }
    }

    protected abstract onTriggerEnter(b: cBody): void;
}
